package design.agent;

/**
 * \* User: Administrator
 * <p>
 * \* Date: 2020/9/22
 * <p>
 * \* Time: 10:23
 * <p>
 * \* Description:
 * \
 */
public class Stock {
    private static int COMPUTER_NUMBER = 100;
    public void increase(int number) {
        COMPUTER_NUMBER += number;
        System.out.println("库存数量：" + COMPUTER_NUMBER);
    }
    public void decrease(int number) {
        COMPUTER_NUMBER -= number;
        System.out.println("库存数量：" + COMPUTER_NUMBER);
    }
    public int getStockNumber() {
        return COMPUTER_NUMBER;
    }
    public void clearStock() {
        Purchase purchase = new Purchase();
        Sale sale = new Sale();
        System.out.println("清理库存数量：" + COMPUTER_NUMBER);
        sale.offSale();
        purchase.refuseBuyIBM();
    }
}
